{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "fc72d98f-8993-4bd4-a545-23d122f3df71",
   "metadata": {},
   "source": [
    "# H₂ Molecule Homework Assignment\n",
    "### Quantum Software Development Journey: From Theory to Application with Classiq - Part 3\n",
    "\n",
    "- Similarly to what we have done in class, in this exercise we will implement the VQE on H2 molecule.\n",
    "- This time instead of using the built-in methods and functions (such as `Molecule` and `MoleculeProblem`) to difne and solve the problem, you will be provided with a two qubits Hamiltonian."
   ]
  },
  {
   "cell_type": "markdown",
   "id": "56eda6d8-76c4-4862-b914-0c4598d67274",
   "metadata": {},
   "source": [
    "## Submission\n",
    "- Submit the completed Jupyter notebook and report via GitHub. Ensure all files are correctly named and organized.\n",
    "- Use the Typeform link provided in the submission folder to confirm your submission.\n",
    "\n",
    "## Additional Resources\n",
    "- [Classiq Documentation](https://docs.classiq.io/latest/)\n",
    "- The notebook from live session #3\n",
    "\n",
    "## Important Dates\n",
    "- **Assignment Release:** 22.5.2024\n",
    "- **Submission Deadline:** 3.6.2024 (7 A.M GMT+3)\n",
    "\n",
    "---\n",
    "\n",
    "Happy coding and good luck!"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "d41e969d-f6a7-4ff7-9660-19ce6c97ba6b",
   "metadata": {},
   "source": [
    "### Part 1"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "f710d6f4-d40b-42d5-b524-c6acb8059fe2",
   "metadata": {},
   "source": [
    "Given the following Hamiltonian:"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "6ba8a6f1-3259-4492-a1ca-3abde7530cd4",
   "metadata": {},
   "source": [
    "$$\n",
    "\\hat{H} = -1.0523 \\cdot (I \\otimes I) + 0.3979 \\cdot (I \\otimes Z) - 0.3979 \\cdot (Z \\otimes I) - 0.0112 \\cdot (Z \\otimes Z) + 0.1809 \\cdot (X \\otimes X)\n",
    "$$"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "736d275c-9a5a-4c08-b891-3078430dc6c1",
   "metadata": {},
   "source": [
    "Complete the following code"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "19266c11-6acc-4edb-910f-2d0dfe80a6c8",
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "from classiq import *\n",
    "\n",
    "HAMILTONIAN = QConstant(\"HAMILTONIAN\", List[PauliTerm], [            \n",
    "            PauliTerm([Pauli.I, Pauli.I], -1.0523),\n",
    "            PauliTerm([Pauli.I, Pauli.Z], 0.3979),\n",
    "            PauliTerm([Pauli.Z, Pauli.I], -0.3979),\n",
    "            PauliTerm([Pauli.Z, Pauli.Z], -0.0112),\n",
    "            PauliTerm([Pauli.X, Pauli.X], 0.1809)])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "id": "0bb68899-2076-45c0-8868-131f38aa3b78",
   "metadata": {},
   "outputs": [],
   "source": [
    "@qfunc\n",
    "def main(q: Output[QArray[QBit]], angles: CArray[CReal, 3]) -> None:\n",
    "    allocate(2, q)\n",
    "    U(angles[0], angles[1], angles[2], 0, q[0])\n",
    "    U(angles[0], angles[1], angles[2], 0, q[1]) \n",
    "  # TODO: Create an ansatz which allows each qubit to have arbitrary rotation\n",
    "\n",
    "\n",
    "@cfunc\n",
    "def cmain() -> None:\n",
    "    res = vqe(\n",
    "        HAMILTONIAN, # TODO: complete the missing argument\n",
    "        False,\n",
    "        [],\n",
    "        optimizer=Optimizer.COBYLA,\n",
    "        max_iteration=1000,\n",
    "        tolerance=0.001,\n",
    "        step_size=0,\n",
    "        skip_compute_variance=False,\n",
    "        alpha_cvar=1.0,\n",
    "    )\n",
    "    save({\"result\": res})\n",
    "\n",
    "qmod = create_model(main, classical_execution_function=cmain) #TODO: complete the line, use classical_execution_function\n",
    "qprog = synthesize(qmod)\n",
    "# show(qprog)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "id": "9b7d8b7e-9fc6-439a-b5b9-72814b6e388f",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Opening: https://platform.classiq.io/circuit/9efa2f60-600d-4c2f-babb-82784b4f9a2b?version=0.41.2\n"
     ]
    }
   ],
   "source": [
    "show(qprog)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "id": "9a1a0eea-da21-41ee-a5dd-8d373e5a37a3",
   "metadata": {
    "scrolled": true
   },
   "outputs": [],
   "source": [
    "execution = execute(qprog)\n",
    "res = execution.result()\n",
    "# execution.open_in_ide()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "id": "2d572b27-94a6-42aa-bd57-da65bfb37bad",
   "metadata": {
    "scrolled": true
   },
   "outputs": [],
   "source": [
    "vqe_result = res[0].value #TODO: complete the line"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "id": "3a7dbf73-5a29-4cdd-9ab2-19af167f873c",
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[TaggedVQESolverResult(value_type=<SavedResultValueType.VQESolverResult: 'VQESolverResult'>, name='result', value=VQESolverResult(energy=-1.0636216796875, time=0.52120041847229, solution=None, eigenstate={'01': (0.09631896879639025+0j), '10': (0.09631896879639025+0j), '00': (0.9906792177592099+0j)}, reduced_probabilities={'01': 0.00927734375, '10': 0.00927734375, '00': 0.9814453125}, optimized_circuit_sample_results=ExecutionDetails(vendor_format_result={}, counts={'01': 19, '10': 19, '00': 2010}, counts_lsb_right=True, parsed_states={'01': {'q': 1.0}, '10': {'q': 2.0}, '00': {'q': 0.0}}, histogram=None, output_qubits_map={'q': (0, 1)}, state_vector=None, parsed_state_vector_states=None, physical_qubits_map={'q': (0, 1)}, num_shots=2048), intermediate_results=[VQEIntermediateData(utc_time=datetime.datetime(2024, 6, 2, 8, 18, 55, 839290, tzinfo=datetime.timezone.utc), iteration_number=1, parameters=[0.7523622954851401, 6.142877755751039, -1.2550017986926845], mean_all_solutions=-0.9595899414062501, solutions=[], standard_deviation=0.41369528009922096), VQEIntermediateData(utc_time=datetime.datetime(2024, 6, 2, 8, 18, 55, 852164, tzinfo=datetime.timezone.utc), iteration_number=2, parameters=[1.75236229548514, 6.142877755751039, -1.2550017986926845], mean_all_solutions=-0.8654404296875, solutions=[], standard_deviation=0.5571767911431977), VQEIntermediateData(utc_time=datetime.datetime(2024, 6, 2, 8, 18, 55, 869533, tzinfo=datetime.timezone.utc), iteration_number=3, parameters=[0.7523622954851401, 7.142877755751039, -1.2550017986926845], mean_all_solutions=-1.0056982421875, solutions=[], standard_deviation=0.42003596754330086), VQEIntermediateData(utc_time=datetime.datetime(2024, 6, 2, 8, 18, 55, 886719, tzinfo=datetime.timezone.utc), iteration_number=4, parameters=[0.7523622954851401, 7.142877755751039, -0.25500179869268447], mean_all_solutions=-1.0056982421875, solutions=[], standard_deviation=0.42003596754330086), VQEIntermediateData(utc_time=datetime.datetime(2024, 6, 2, 8, 18, 55, 905241, tzinfo=datetime.timezone.utc), iteration_number=5, parameters=[-0.14572206232409834, 7.582701000087178, -1.2550017986926845], mean_all_solutions=-1.0635908203125, solutions=[], standard_deviation=0.20179041877572876), VQEIntermediateData(utc_time=datetime.datetime(2024, 6, 2, 8, 18, 55, 923279, tzinfo=datetime.timezone.utc), iteration_number=6, parameters=[-0.8180855181726773, 8.32292217192662, -1.2550017986926845], mean_all_solutions=-1.02379228515625, solutions=[], standard_deviation=0.44388492215658343), VQEIntermediateData(utc_time=datetime.datetime(2024, 6, 2, 8, 18, 55, 940725, tzinfo=datetime.timezone.utc), iteration_number=7, parameters=[-0.46004638486959115, 7.193856274963747, -1.2550017986926845], mean_all_solutions=-1.04698359375, solutions=[], standard_deviation=0.3135429139733092), VQEIntermediateData(utc_time=datetime.datetime(2024, 6, 2, 8, 18, 55, 961204, tzinfo=datetime.timezone.utc), iteration_number=8, parameters=[-0.14572206232409834, 7.582701000087178, -1.5050017986926845], mean_all_solutions=-1.0635908203125, solutions=[], standard_deviation=0.20179041877572876), VQEIntermediateData(utc_time=datetime.datetime(2024, 6, 2, 8, 18, 55, 973754, tzinfo=datetime.timezone.utc), iteration_number=9, parameters=[0.3536937054702961, 7.558537165988767, -1.2550017986926845], mean_all_solutions=-1.05553759765625, solutions=[], standard_deviation=0.267698329129115), VQEIntermediateData(utc_time=datetime.datetime(2024, 6, 2, 8, 18, 55, 986321, tzinfo=datetime.timezone.utc), iteration_number=10, parameters=[-0.20685850037974207, 7.825110438727402, -1.2550017986926845], mean_all_solutions=-1.06360224609375, solutions=[], standard_deviation=0.22184087245712253), VQEIntermediateData(utc_time=datetime.datetime(2024, 6, 2, 8, 18, 55, 998912, tzinfo=datetime.timezone.utc), iteration_number=11, parameters=[-0.32814582305280393, 7.79487163321527, -1.2550017986926845], mean_all_solutions=-1.05730498046875, solutions=[], standard_deviation=0.26055143022744964), VQEIntermediateData(utc_time=datetime.datetime(2024, 6, 2, 8, 18, 56, 15840, tzinfo=datetime.timezone.utc), iteration_number=12, parameters=[-0.20685850037974207, 7.825110438727402, -1.3175017986926845], mean_all_solutions=-1.06360224609375, solutions=[], standard_deviation=0.22184087245712253), VQEIntermediateData(utc_time=datetime.datetime(2024, 6, 2, 8, 18, 56, 33697, tzinfo=datetime.timezone.utc), iteration_number=13, parameters=[-0.08568156229643936, 7.855788601592141, -1.2550017986926845], mean_all_solutions=-1.06037685546875, solutions=[], standard_deviation=0.19004432572269353), VQEIntermediateData(utc_time=datetime.datetime(2024, 6, 2, 8, 18, 56, 53896, tzinfo=datetime.timezone.utc), iteration_number=14, parameters=[-0.26748783646929336, 7.809933693182319, -1.2550017986926845], mean_all_solutions=-1.0594783203125, solutions=[], standard_deviation=0.23935672770209793), VQEIntermediateData(utc_time=datetime.datetime(2024, 6, 2, 8, 18, 56, 71245, tzinfo=datetime.timezone.utc), iteration_number=15, parameters=[-0.21444687315228414, 7.855425106772178, -1.2550017986926845], mean_all_solutions=-1.0618494140625, solutions=[], standard_deviation=0.2231962091717916), VQEIntermediateData(utc_time=datetime.datetime(2024, 6, 2, 8, 18, 56, 94419, tzinfo=datetime.timezone.utc), iteration_number=16, parameters=[-0.15083470598200438, 7.797405124051695, -1.2550017986926845], mean_all_solutions=-1.06288662109375, solutions=[], standard_deviation=0.20404623306233025), VQEIntermediateData(utc_time=datetime.datetime(2024, 6, 2, 8, 18, 56, 111334, tzinfo=datetime.timezone.utc), iteration_number=17, parameters=[-0.19584067813562436, 7.854353730146069, -1.2550017986926845], mean_all_solutions=-1.0626921875000002, solutions=[], standard_deviation=0.21910613783662028), VQEIntermediateData(utc_time=datetime.datetime(2024, 6, 2, 8, 18, 56, 128088, tzinfo=datetime.timezone.utc), iteration_number=18, parameters=[-0.21827683580847798, 7.81444450037033, -1.2550017986926845], mean_all_solutions=-1.062158984375, solutions=[], standard_deviation=0.22587602387593633), VQEIntermediateData(utc_time=datetime.datetime(2024, 6, 2, 8, 18, 56, 148533, tzinfo=datetime.timezone.utc), iteration_number=19, parameters=[-0.20685850037974207, 7.825110438727402, -1.2628142986926845], mean_all_solutions=-1.06360224609375, solutions=[], standard_deviation=0.22184087245712253), VQEIntermediateData(utc_time=datetime.datetime(2024, 6, 2, 8, 18, 56, 165764, tzinfo=datetime.timezone.utc), iteration_number=20, parameters=[-0.1929194344266117, 7.818050476591932, -1.2550017986926845], mean_all_solutions=-1.0636216796875, solutions=[], standard_deviation=0.21841698149054273), VQEIntermediateData(utc_time=datetime.datetime(2024, 6, 2, 8, 18, 56, 187744, tzinfo=datetime.timezone.utc), iteration_number=21, parameters=[-0.1893012005709727, 7.824974603974924, -1.2550017986926845], mean_all_solutions=-1.062333984375, solutions=[], standard_deviation=0.21492844244558598), VQEIntermediateData(utc_time=datetime.datetime(2024, 6, 2, 8, 18, 56, 205045, tzinfo=datetime.timezone.utc), iteration_number=22, parameters=[-0.1929194344266117, 7.818050476591932, -1.2589080486926845], mean_all_solutions=-1.0636216796875, solutions=[], standard_deviation=0.21841698149054273), VQEIntermediateData(utc_time=datetime.datetime(2024, 6, 2, 8, 18, 56, 225705, tzinfo=datetime.timezone.utc), iteration_number=23, parameters=[-0.1963967345422016, 7.811054510600297, -1.2550017986926845], mean_all_solutions=-1.0630455078125, solutions=[], standard_deviation=0.21910756220152733), VQEIntermediateData(utc_time=datetime.datetime(2024, 6, 2, 8, 18, 56, 243564, tzinfo=datetime.timezone.utc), iteration_number=24, parameters=[-0.1910959437303572, 7.821504991137157, -1.2550017986926845], mean_all_solutions=-1.062312109375, solutions=[], standard_deviation=0.21633208368007564), VQEIntermediateData(utc_time=datetime.datetime(2024, 6, 2, 8, 18, 56, 265345, tzinfo=datetime.timezone.utc), iteration_number=25, parameters=[-0.19119217715399903, 7.817138731243804, -1.2550017986926845], mean_all_solutions=-1.0624887695312502, solutions=[], standard_deviation=0.21633258860153015), VQEIntermediateData(utc_time=datetime.datetime(2024, 6, 2, 8, 18, 56, 284737, tzinfo=datetime.timezone.utc), iteration_number=26, parameters=[-0.19682280819421086, 7.817900602334907, -1.2550017986926845], mean_all_solutions=-1.0632221679687501, solutions=[], standard_deviation=0.21910806072705727), VQEIntermediateData(utc_time=datetime.datetime(2024, 6, 2, 8, 18, 56, 305301, tzinfo=datetime.timezone.utc), iteration_number=27, parameters=[-0.1924104650166947, 7.816164834153558, -1.2550017986926845], mean_all_solutions=-1.0636216796875, solutions=[], standard_deviation=0.21841698149054273), VQEIntermediateData(utc_time=datetime.datetime(2024, 6, 2, 8, 18, 56, 326182, tzinfo=datetime.timezone.utc), iteration_number=28, parameters=[-0.19195398549816464, 7.818311068929809, -1.2550017986926845], mean_all_solutions=-1.0636216796875, solutions=[], standard_deviation=0.21841698149054273), VQEIntermediateData(utc_time=datetime.datetime(2024, 6, 2, 8, 18, 56, 342414, tzinfo=datetime.timezone.utc), iteration_number=29, parameters=[-0.1929194344266117, 7.818050476591932, -1.2555017986926844], mean_all_solutions=-1.0636216796875, solutions=[], standard_deviation=0.21841698149054273)], optimal_parameters={'angles_0': -0.1929194344266117, 'angles_1': 7.818050476591932, 'angles_2': -1.2550017986926845}, convergence_graph_str='/9j/4AAQSkZJR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qYY1qIuW8qd9c53YUejaelpbVTPudxqYbVUsqKNs7o/q9mJ0TWZaxFVuy9eXK5RN5SACYZoa3R1rJErK9aKOrWtZbVlbxZs21t7SJs7X2l2tna2UXfg2J9IW+os92tj5qlILpUuqZnI5u01zlaqo3scInYpyop3wBP1+lIrnW8LWXa5y0nDsqFoFkZwG2xyOb+5t4RzUXG1jcUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB/9k=', num_solutions=None, num_shots=2048))]\n"
     ]
    }
   ],
   "source": [
    "print(res)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "id": "de17cfc0-8e64-4493-b4c2-4a97fc9797a0",
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Optimal energy: -1.0636216796875\n",
      "Optimal parameters: {'angles_0': -0.1929194344266117, 'angles_1': 7.818050476591932, 'angles_2': -1.2550017986926845}\n",
      "Eigenstate: {'01': (0.09631896879639025+0j), '10': (0.09631896879639025+0j), '00': (0.9906792177592099+0j)}\n"
     ]
    }
   ],
   "source": [
    "print(f\"Optimal energy: {vqe_result.energy}\")\n",
    "print(f\"Optimal parameters: {vqe_result.optimal_parameters}\")\n",
    "print(f\"Eigenstate: {vqe_result.eigenstate}\")"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "5df11dfc-3e3a-4191-bd47-d522ca3dcbfa",
   "metadata": {},
   "source": [
    "Does it similar to the `optimal energy` we calculated in class? \\\n",
    "Does it similar to the `total energy` we calculated in class?"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "4631460f-1f90-4fd0-944b-dec61dcb298c",
   "metadata": {},
   "outputs": [],
   "source": [
    "This is not similar to neither the optimal energy nor the total energy."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 30,
   "id": "ae650e09-6c10-4442-abcc-731253a13d5b",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Help on function vqe in module classiq.qmod.builtins.classical_execution_primitives:\n",
      "\n",
      "vqe(hamiltonian: List[Mapping[str, Any]], maximize: bool, initial_point: List[float], optimizer: classiq.interface.generator.expressions.enums.optimizers.Optimizer, max_iteration: int, tolerance: float, step_size: float, skip_compute_variance: bool, alpha_cvar: float) -> classiq.interface.executor.vqe_result.VQESolverResult\n",
      "\n"
     ]
    }
   ],
   "source": [
    "help(vqe)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "4f0e0bea-b12f-43ad-94e8-100fedf2b57f",
   "metadata": {},
   "source": [
    "### Part 2"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "66882248-de08-4a6e-b33c-647f015f7d79",
   "metadata": {},
   "source": [
    "**Now, we want to have a more interesting ansatz in our `main`.**  \n",
    "Add **one** line of code to the `main` function you created in Part 1 that creates **entanglement** between the two qubits.  \n",
    "Which gate should you use?"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "id": "ddd4b2ad-153d-45ad-82ac-f6355a1914f6",
   "metadata": {},
   "outputs": [],
   "source": [
    "@qfunc\n",
    "def main(q: Output[QArray[QBit]], angles: CArray[CReal, 3]) -> None:\n",
    "    allocate(2, q)\n",
    "    U(angles[0], angles[1], angles[2], 0, q[0])\n",
    "    U(angles[0], angles[1], angles[2], 0, q[1])\n",
    "    CX(q[0],q[1])   \n",
    "# TODO: Create an ansatz which allows each qubit to have arbitrary rotation\n",
    "\n",
    "\n",
    "\n",
    "@cfunc\n",
    "def cmain() -> None:\n",
    "    res = vqe(\n",
    "        HAMILTONIAN, # TODO: complete the missing argument\n",
    "        False,\n",
    "        [],\n",
    "        optimizer=Optimizer.COBYLA,\n",
    "        max_iteration=1000,\n",
    "        tolerance=0.001,\n",
    "        step_size=0,\n",
    "        skip_compute_variance=False,\n",
    "        alpha_cvar=1.0,\n",
    "    )\n",
    "    save({\"result\": res})\n",
    "\n",
    "qmod = create_model(main, classical_execution_function=cmain) #TODO: complete the line, use classical_execution_function\n",
    "qprog = synthesize(qmod)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "id": "16e9b199-8447-4856-826c-152cf57ea4bb",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Opening: https://platform.classiq.io/circuit/22272543-36e8-48fe-8fab-dc076e0d239e?version=0.41.2\n"
     ]
    }
   ],
   "source": [
    "show(qprog)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "id": "112a1590-283c-4f79-8035-72936561102d",
   "metadata": {},
   "outputs": [],
   "source": [
    "execution = execute(qprog)\n",
    "res = execution.result()\n",
    "# execution.open_in_ide()\n",
    "vqe_result = res[0].value #TODO: complete the line"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "id": "2d3bd73e-bb89-49d6-a3a8-1488e0459565",
   "metadata": {},
   "outputs": [],
   "source": [
    "execution.open_in_ide()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "id": "06500e4c-a04b-4cfa-a84d-41f96a0c68eb",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Optimal energy: -1.082470703125\n",
      "Optimal parameters: {'angles_0': -6.039443074452129, 'angles_1': 2.1121611522056556, 'angles_2': 5.197782449297897}\n",
      "Eigenstate: {'01': (0.02209708691207961+0j), '11': (0.1269381000724369+0j), '10': (0.10126157341262282+0j), '00': (0.9864808823540373+0j)}\n"
     ]
    }
   ],
   "source": [
    "print(f\"Optimal energy: {vqe_result.energy}\")\n",
    "print(f\"Optimal parameters: {vqe_result.optimal_parameters}\")\n",
    "print(f\"Eigenstate: {vqe_result.eigenstate}\")"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "30a635d7-2f15-4c94-a94b-f4270f17aed8",
   "metadata": {},
   "source": [
    "Does it similar to the `optimal energy` we calculated in class? \\\n",
    "Does it similar to the `total energy` we calculated in class? \\\n",
    "What can we learn about the provided  form this result Hamiltonian?"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "9c1e58f2-4031-4104-86c6-8ec78ea4d867",
   "metadata": {},
   "outputs": [],
   "source": [
    "The calculation result is not similar to the optimal energy we calculated in class. \n",
    "\n",
    "It gets closer but is not similar to the total energy.\n",
    "\n",
    "From this calculation, we can recognize the significance of the Ansatz and Hamiltonian. To obtain a\n",
    "meaningful result, we should carefully select and justify our Ansatz and Hamiltonian.\n",
    "They should be able to represent the problem we would like to solve on the quantum computer."
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.11.9"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
